Revert "nvmem: core: Fix a conflict between MTD and NVMEM on wp-gpios property"

This reverts commit 34ec4c7831c416ac56619477f1701986634a7efc which is
commit f6c052afe6f802d87c74153b7a57c43b2e9faf07 upstream.

It breaks the Android kernel api, and isn't even really needed in the
5.10.y kernel tree yet, as there are no users of the new field.  So
revert it for now.  If it is needed, it can be brought back in an
abi-safe way in the future.

Bug: 161946584
Change-Id: Ib1df4adb89fa493d044d1108da6ce6e667a5e0c7
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 9da4edb..1c17c5d 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -629,7 +629,7 @@
 
 	if (config->wp_gpio)
 		nvmem->wp_gpio = config->wp_gpio;
-	else if (!config->ignore_wp)
+	else
 		nvmem->wp_gpio = gpiod_get_optional(config->dev, "wp",
 						    GPIOD_OUT_HIGH);
 	if (IS_ERR(nvmem->wp_gpio)) {
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 39ec676..06409a6c4 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -49,8 +49,7 @@
  * @word_size:	Minimum read/write access granularity.
  * @stride:	Minimum read/write access stride.
  * @priv:	User context passed to read/write callbacks.
- * @wp-gpio:	Write protect pin
- * @ignore_wp:  Write Protect pin is managed by the provider.
+ * @wp-gpio:   Write protect pin
  *
  * Note: A default "nvmem<id>" name will be assigned to the device if
  * no name is specified in its configuration. In such case "<id>" is
@@ -70,7 +69,6 @@
 	enum nvmem_type		type;
 	bool			read_only;
 	bool			root_only;
-	bool			ignore_wp;
 	bool			no_of_node;
 	nvmem_reg_read_t	reg_read;
 	nvmem_reg_write_t	reg_write;